import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_module/utils/navigator_util.dart';

import '../global.dart';

class DetailPage extends StatefulWidget {
  @override
  State<DetailPage> createState()=> _DetailPageState();
}

class _DetailPageState extends State<DetailPage> {

  String? data = preferences.get("data") as String?;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: IconButton(
          onPressed: () {
            NavigatorUtil.pop(context);
          },
          icon: Icon(Icons.arrow_back_ios_new),
        ),
        title: const Text("详情页面 - Flutter页面"),
      ),
      body: Container(
        height: double.infinity,
        width: double.infinity,
        color: Colors.red,
        child: Center(
          child: Text("${data}"),
        ),
      ),
    );
  }
}